<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>

  账号: <input id="acc" type="text">

  <br> <br>

  密码: <input id="pwd" type="password">

  <br> <br>

  <button id="btn">登录</button>



  <script src="../js/jquery-3.5.1.min.js"></script>

  <script>
    let acc = document.getElementById("acc");
    let pwd = document.getElementById("pwd");
    let btn = document.getElementById("btn");

    btn.onclick = function () {
      // 获取用户输入的账号和密码
      let accVal = acc.value;
      let pwdVal = pwd.value;


      $.ajax({
        type: "POST",
        url: "http://127.0.0.1:9091/login",
        data: {"account": accVal, "password": pwdVal},
        dataType: "json",
        success: function (response) {

          console.log(response);
          
        }
      });



    }
  </script>
</body>

</html>